package com.example.myblog.service;

import com.example.myblog.dto.UserDTO;
import com.example.myblog.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.myblog.exception.BaseException;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author 叶兴
 * @since 2022-09-29
 */
public interface UserService extends IService<User> {

    int insertUser(String username,String password) throws BaseException;

    String selectUser(String username,String password) throws BaseException;

    int logout(String username) throws BaseException;


    Map<String,String> updateAvatar(MultipartFile avatar);

    UserDTO getUserInfo(String username) throws BaseException;

    boolean ifUserExists(String username) throws BaseException;
}
